package com.link.base.base.mvg.service;

import com.link.base.base.mvg.model.Mvg;
import com.link.core.basic.model.BasicModel;

import java.util.HashMap;
import java.util.List;

/**
 * @author unknown
 * @date unknown
 * @comments mvg操作
 */
public interface MvgService {

    /**
     * 分页查询左列表
     *
     * @param entity
     * @return List HashMap
     * @throws Exception
     */
    public List<HashMap<String, String>> queryLeftListPage(BasicModel entity) throws Exception;

    /**
     * 分页查询右列表
     *
     * @param entity
     * @return List HashMap
     * @throws Exception
     */
    public List<HashMap<String, String>> queryRightListPage(BasicModel entity) throws Exception;

    /**
     * 删除右列表所有数据
     *
     * @param entity
     * @throws Exception
     */
    public void deleteAllById(Mvg entity) throws Exception;

    /**
     * 批量删除右列表数据
     *
     * @param list
     * @return 默认子ID
     * @throws Exception
     */
    public Long batchDeleteById(List<Mvg> list) throws Exception;

    /**
     * 删除右列表一条数据
     *
     * @param entity
     * @throws Exception
     */
    public void deleteById(Mvg entity) throws Exception;

    /**
     * 批量插入数据到右列表
     *
     * @param list
     * @return 默认子ID
     * @throws Exception
     */
    public Long batchInsert(List<Mvg> list) throws Exception;

    /**
     * 插入一条数据到右列表
     *
     * @param entity
     * @throws Exception
     */
    public void insert(Mvg entity) throws Exception;

    /**
     * 查询默认ID
     *
     * @param entity
     * @return 默认ID
     * @throws Exception
     */
    public Long queryDefault(Mvg entity) throws Exception;

    /**
     * 根据mapper名称获取对应bean的url
     * @param mvgMapperName 启用的mapper名称
     * @return
     * @throws Exception
     */
    /*public String getBeanName(String mvgMapperName) throws Exception;*/

    /**
     * 获取正在启用的mapper的名称
     * @return String
     */
    public String getMvgMapperName();

    /**
     * 设置mapper名称，根据名称来启用mapper
     *
     * @param mapperName
     */
    public void setMvgMapperName(String mapperName);

    /**
     * 设置主表默认id值
     *
     * @author yrf
     * @param entity
     * @throws Exception
     */
    void setDefaultIdUpdate(Mvg entity) throws Exception;

    /**
     * 统一修改mvg，包括在中间表新增，删除以及在主表设置默认记录
     *
     * @author yrf
     * @param list
     * @throws Exception
     */
    void mvgModify(List<Mvg> list) throws Exception;
}
